/**
 * Copyright 2014-2020 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.webank.webase.front.contractStore.constant;


public class ToolsConstantContext {
    public static final String ADDRESS_SOURCE = "cHJhZ21hIHNvbGlkaXR5IF4wLjQuMjQ7CgpsaWJyYXJ5IEFkZHJlc3MgewoKICAgIGZ1bmN0aW9uIGlzQ29udHJhY3QoYWRkcmVzcyBhZGRyKSBpbnRlcm5hbCB2aWV3IHJldHVybnMoYm9vbCkgewogICAgICAgIHVpbnQyNTYgc2l6ZTsKICAgICAgICBhc3NlbWJseSB7IHNpemUgOj0gZXh0Y29kZXNpemUoYWRkcikgfSAgCiAgICAgICAgcmV0dXJuIHNpemUgPiAwOwogICAgfQoKICAgIGZ1bmN0aW9uIGlzRW1wdHlBZGRyZXNzKGFkZHJlc3MgYWRkcikgaW50ZXJuYWwgcHVyZSByZXR1cm5zKGJvb2wpewogICAgICAgIHJldHVybiBhZGRyID09IGFkZHJlc3MoMCk7CiAgICB9Cn0=";
    public static final String LIB_STRING_SOURCE = "Ci8qKgogKiBAZmlsZTogTGliU3RyaW5nCiAqIEBhdXRob3I6IGZpc2NvLWRldgogKiAKICogQGRhdGU6IDIwMTgKICovCgpwcmFnbWEgc29saWRpdHkgPj0wLjQuMjQgPDAuNi4xMDsKCmxpYnJhcnkgTGliU3RyaW5nIHsKICAgIAogICAgdXNpbmcgTGliU3RyaW5nIGZvciAqOwogICAgCiAgICBmdW5jdGlvbiBieXRlc1RvU3RyaW5nKGJ5dGVzIG1lbW9yeSBfYnl0ZXMpIGludGVybmFsIHB1cmUgcmV0dXJucyAoc3RyaW5nIG1lbW9yeS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aGFyQ291bnQpOwogICAgICAgIGZvcih1aW50IGo9MDtqPGNoYXJDb3VudDtqKyspewogICAgICAgICAgICBieXRlc1N0cmluZ1RyaW1tZWRbal09Ynl0ZXNTdHJpbmdbal07CiAgICAgICAgfQogICAgICAgIHJldHVybiBzdHJpbmcoYnl0ZXNTdHJpbmdUcmltbWVkKTsKICAgIH0KCgogICAgZnVuY3Rpb24gc3RyaW5nVG9CeXRlczMyKHN0cmluZyBtZW1vcnkgc291cmNlKSBpbnRlcm5hbCBwdXJlIHJldHVybnMoYnl0ZXMzMiByZXN1bHQpewogICAgICAgIGFzc2VtYmx5ewogICAgICAgICAgICByZXN1bHQgOj0gbWxvYWQoYWRkKHNvdXJjZSwzMikpCiAgICAgICAgfQogICAgfQoKCiAgICBmdW5jdGlvbiBtZW1jcHkodWludCBkZXN0LCB1aW50IHNyYywgdWludCBsZW4pIHByaXZhdGUgewogICAgICAgIC8vIENvcHkgd29yZC1sZW5ndGggY2h1bmtzIHdoaWxlIHBvc3NpYmxlCiAgICAgICAgZm9yKDsgbGVuID49IDMyOyBsZW4gLT0gMzIpIHsKICAgICAgICAgICAgYXNzZW1ibHkgewogICAgICAgICAgICAgICAgbXN0b3JlKGRlc3QsIG1sb2FkKHNyYykpCiAgICAgICAgICAgIH0KICAgICAgICAgICAgZGVzdCArPSAzMjsKICAgICAgICAgICAgc3JjICs9IDMyOwogICAgICAgIH0KCiAgICAgICAgLy8gQ29weSByZW1haW5pbmcgYnl0ZXMKICAgICAgICB1aW50IG1hc2sgPSAyNTYgKiogKDMyIC0gbGVuKSAtIDE7CiAgICAgICAgYXNzZW1ibHkgewogICAgICAgICAgICBsZXQgc3JjcGFydCA6PSBhbmQobWxvYWQoc3JjKSwgbm90KG1hc2spKQogICAgICAgICAgICBsZXQgZGVzdHBhcnQgOj0gYW5kKG1sb2FkKGRlc3QpLCBtYXNrKQogICAgICAgICAgICBtc3RvcmUoZGVzdCwgb3IoZGVzdHBhcnQsIHNyY3BhcnQpKQog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ldfDB4MjA7CiAgICAgICAgICAgIGJ5dGUgY2gyID0gYnl0ZXMoX3N0cilbaV18MHgyMDsKICAgICAgICAgICAgaWYgKGNoMSA+PSAnYScgJiYgY2gxIDw9J3onICYmIGNoMiA+PSAnYScgJiYgY2gyIDw9J3onKSB7CiAgICAgICAgICAgICAgICBpZiAoY2gxID4gY2gyKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDE7CiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNoMSA8IGNoMikgewogICAgICAgICAgICAgICAgICAgIHJldHVybiAtMTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIGlmIChieXRlcyhfc2VsZilbaV0gPiBieXRlcyhfc3RyKVtpXSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiAxOwogICAgICAgICAgICAgICAgfSBlbHNlIGlmIChieXRlcyhfc2VsZilbaV0gPCBieXRlcyhfc3RyKVtpXSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiAtMTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAKICAgICAgICBpZiAoYnl0ZXMoX3NlbGYpLmxlbmd0aCA+IGJ5dGVzKF9zdHIpLmxlbmd0aCkgewogICAgICAgICAgICByZXR1cm4gMTsKICAgICAgICB9IGlmIChieXRlcyhfc2VsZikubGVuZ3RoIDwgYnl0ZXMoX3N0cikubGVuZ3RoKSB7CiAgICAgICAgICAgIHJldHVybiAtMTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgICByZXR1cm4gMDsKICAgICAgICB9CiAgICB9CgogICAgZnVuY3Rpb24gZXF1YWxzKHN0cmluZyBtZW1vcnkgX3NlbGYsIHN0cmluZyBtZW1vcnkgX3N0cikgaW50ZXJuYWwgcHVyZSByZXR1cm5zIChib29sIF9yZXQpIHsKICAgICAgICBpZiAoYnl0ZXMoX3NlbGYpLmxlbmd0aCAhPSBieXRlcyhfc3RyKS5sZW5ndGgpIHsKICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIH0KCiAgICAgICAgZm9yICh1aW50IGk9MDsgaTxieXRlcyhfc2VsZikubGVuZ3RoOyArK2kpIHsKICAgICAgICAgICAgaWYgKGJ5dGVzKF9zZWxmKVtpXSAhPSBieXRlcyhfc3RyKVtpXSkgewogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIAogICAgICAgIHJldHVybiB0cnVlOwogICAgfQoKICAgIGZ1bmN0aW9uIGVxdWFsc05vQ2FzZShzdHJpbmcgbWVtb3J5IF9zZWxmLCBzdHJpbmcgbWVtb3J5IF9zdHIpIGludGVybmFsIHB1cmUgcmV0dXJucyAoYm9vbCBfcmV0KSB7CiAgICAgICAgaWYgKGJ5dGVzKF9zZWxmKS5sZW5ndGggIT0gYnl0ZXMoX3N0cikubGVuZ3RoKSB7CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICB9CgogICAgICAgIGZvciAodWludCBpPTA7IGk8Ynl0ZXMoX3NlbGYpLmxlbmd0aDsgKytpKSB7CiAgICAgICAgICAgIGJ5dGUgY2gxID0gYnl0ZXMoX3NlbGYpW2ldfDB4MjA7CiAgICAgICAgICAgIGJ5dGUgY2gyID0gYnl0ZXMoX3N0cilbaV18MHgyMDsKICAgICAgICAgICAgaWYgKGNoMSA+PSAnYScgJiYgY2gxIDw9J3onICYmIGNoMiA+PSAnYScgJiYgY2gyIDw9J3onKSB7CiAgICAgICAgICAgICAgICBpZiAoY2gxICE9IGNoMikgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIGlmIChieXRlcyhfc2VsZilbaV0gIT0gYnl0ZXMoX3N0cilbaV0pIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgCiAgICAgICAgcmV0dXJuIHRydWU7CiAgICB9CiAgICAKICAgIGZ1bmN0aW9uIHN1YnN0cihzdHJpbmcgbWVtb3J5IF9zZWxmLCB1aW50IF9zdGFydCwgdWludCBfbGVuKSBpbnRlcm5hbCByZXR1cm5zIChzdHJpbmcgbWVtb3J5IF9yZXQpIHsKICAgICAgICBpZiAoX2xlbiA+IGJ5dGVzKF9zZWxmKS5sZW5ndGgtX3N0YXJ0KSB7CiAgICAgICAgICAgIF9sZW4gPSBieXRlcyhfc2VsZikubGVuZ3RoLV9zdGFydDsKICAgICAgICB9CgogICAgICAgIGlmIChfbGVuIDw9IDApIHsKICAgICAgICAgICAgX3JldCA9ICIiOwogICAgICAgICAgICByZXR1cm4gX3JldDsKICAgICAgICB9CiAgICAgICAgCiAgICAgICAgX3JldCA9IG5ldyBzdHJpbmcoX2xlbik7CgogICAgICAgIHVpbnQgc2VsZnB0cjsKICAgICAgICB1aW50IHJldHB0cjsKICAgICAgICBhc3NlbWJseSB7CiAgICAgICAgICAgIHNlbGZwdHIgOj0gYWRkKF9zZWxmLCAweDIwKQogICAgICAgICAgICByZXRwdHIgOj0gYWRkKF9yZXQsIDB4MjApCiAgICAgICAgfQogICAgICAgIAogICAgICAgIG1lbWNweShyZXRwdHIsIHNlbGZwdHIrX3N0YXJ0LCBfbGVuKTsKICAgIH0KICAgIAogICAgZnVuY3Rpb24gY29uY2F0KHN0cmluZyBtZW1vcnkgX3NlbGYsIHN0cmluZyBtZW1vcnkgX3N0cikgaW50ZXJuYWwgcmV0dXJucyAoc3RyaW5nIG1lbW9yeSBfcmV0KSB7CiAgICAgICAgX3JldCA9IG5ldyBzdHJpbmcoYnl0ZXMoX3NlbGYpLmxlbmd0aCArIGJ5dGVzKF9zdHIpLmxlbmd0aCk7CgogICAgICAgIHVpbnQgc2VsZnB0cjsKICAgICAgICB1aW50IHN0cnB0cjsKICAgICAgICB1aW50IHJldHB0cjsKICAgICAgICBhc3NlbWJseSB7CiAgICAgICAgICAgIHNlbGZwdHIgOj0gYWRkKF9zZWxmLCAweDIwKQogICAgICAgICAgICBzdHJwdHIgOj0gYWRkKF9zdHIsIDB4MjApCiAgICAgICAgICAgIHJldHB0ciA6PSBhZGQoX3JldCwgMHgyMCkKICAgICAgICB9CiAgICAgICAgCiAgICAgICAgbWVtY3B5KHJldHB0ciwgc2VsZnB0ciwgYnl0ZXMoX3NlbGYpLmxlbmd0aCk7CiAgICAgICAgbWVtY3B5KHJldHB0citieXRlcyhfc2VsZikubGVuZ3RoLCBzdHJwdHIsIGJ5dGVzKF9zdHIpLmxlbmd0aCk7CiAgICB9CiAgICAKICAgIGZ1bmN0aW9uIGNvbmNhdChzdHJpbmcgbWVtb3J5IF9zZWxmLCBzdHJpbmcgbWVtb3J5IF9zdHIxLCBzdHJpbmcgbWVtb3J5IF9zdHIyKQogICAgICAgIGludGVybmFsIHJldHVybnMgKHN0cmluZyBtZW1vcnkgX3JldCkgewogICAgICAgIF9yZXQgPSBuZXcgc3RyaW5nKGJ5dGVzKF9zZWxmKS5sZW5ndGggKyBieXRlcyhfc3RyMSkubGVuZ3RoICsgYnl0ZXMoX3N0cjIpLmxlbmd0aCk7CgogICAgICAgIHVpbnQgc2VsZnB0cjsKICAgICAgICB1aW50IHN0cjFwdHI7CiAgICAgICAgdWludCBzdHIycHRyOwogICAgICAgIHVpbnQgcmV0cHRyOwogICAgICAgIGFzc2VtYmx5IHsKICAgICAgICAgICAgc2VsZnB0ciA6PSBhZGQoX3NlbGYsIDB4MjApCiAgICAgICAgICAgIHN0cjFwdHIgOj0gYWRkKF9zdHIxLCAweDIwKQogICAgICAgICAgICBzdHIycHRyIDo9IGFkZChfc3RyMiwgMHgyMCkKICAgICAgICAgICAgcmV0cHRyIDo9IGFkZChfcmV0LCAweDIwKQogICAgICAgIH0KICAgICAgICAKICAgICAgICB1aW50IHBvcyA9IDA7CiAgICAgICAgbW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GFkZChfc3RyMywgMHgyMCkKICAgICAgICAgICAgcmV0cHRyIDo9IGFkZChfcmV0LCAweDIwKQogICAgICAgIH0KICAgICAgICAKICAgICAgICB1aW50IHBvcyA9IDA7CiAgICAgICAgbWVtY3B5KHJldHB0citwb3MsIHNlbGZwdHIsIGJ5dGVzKF9zZWxmKS5sZW5ndGgpOwogICAgICAgIHBvcyArPSBieXRlcyhfc2VsZikubGVuZ3RoOwogICAgICAgIG1lbWNweShyZXRwdHIrcG9zLCBzdHIxcHRyLCBieXRlcyhfc3RyMSkubGVuZ3RoKTsKICAgICAgICBwb3MgKz0gYnl0ZXMoX3N0cjEpLmxlbmd0aDsKICAgICAgICBtZW1jcHkocmV0cHRyK3Bvcywgc3RyMnB0ciwgYnl0ZXMoX3N0cjIpLmxlbmd0aCk7CiAgICAgICAgcG9zICs9IGJ5dGVzKF9zdHIyKS5sZW5ndGg7CiAgICAgICAgbWVtY3B5KHJldHB0citwb3MsIHN0cjNwdHIsIGJ5dGVzKF9zdHIzKS5sZW5ndGgpOwogICAgICAgIHBvcyArPSBieXRlcyhfc3RyMykubGVuZ3RoOwogICAgfQogICAgCiAgICBmdW5jdGlvbiB0cmltKHN0cmluZyBtZW1vcnkgX3NlbGYpIGludGVybmFsIHJldHVybnMgKHN0cmluZyBtZW1vcnkgX3JldCkgewogICAgICAgIHVpbnQgaTsKICAgICAgICB1aW50OCBjaDsKICAgICAgICBmb3IgKGk9MDsgaTxieXRlcyhfc2VsZikubGVuZ3RoOyArK2kpIHsKICAgICAgICAgICAgY2ggPSB1aW50OChieXRlcyhfc2VsZilbaV0pOwogICAgICAgICAgICBpZiAoIShjaCA9PSAweDIwIHx8IGNoID09IDB4MDkgfHwgY2ggPT0gMHgwRCB8fCBjaCA9PSAweDBBKSkgewogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgdWludCBzdGFydCA9IGk7CiAgICAgICAgCiAgICAgICAgZm9yIChpPWJ5dGVzKF9zZWxmKS5sZW5ndGg7IGk+MDsgLS1pKSB7CiAgICAgICAgICAgIGNoID0gdWludDgoYnl0ZXMoX3NlbGYpW2ktMV0pOwogICAgICAgICAgICBpZiAoIShjaCA9PSAweDIwIHx8IGNoID09IDB4MDkgfHwgY2ggPT0gMHgwRCB8fCBjaCA9PSAweDBBKSkgewogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgdWludCBlbmQgPSBpOwogICAgICAgIAogICAgICAgIF9yZXQgPSBuZXcgc3RyaW5nKGVuZC1zdGFydCk7CiAgICAgICAgCiAgICAgICAgdWludCBzZWxmcHRyOwogICAgICAgIHVpbnQgcmV0cHRyOwogICAgICAgIGFzc2VtYmx5IHsKICAgICAgICAgICAgc2VsZnB0ciA6PSBhZGQoX3NlbGYsIDB4MjApCiAgICAgICAgICAgIHJldHB0ciA6PSBhZGQoX3JldCwgMHgyMCkKICAgICAgICB9CiAgICAgICAgCiAgICAgICAgbWVtY3B5KHJldHB0ciwgc2VsZnB0citzdGFydCwgZW5kLXN0YXJ0KTsKICAgIH0KICAgIAogICAgZnVuY3Rpb24gdHJpbShzdHJpbmcgbWVtb3J5IF9zZWxmLCBzdHJpbmcgbWVtb3J5IF9jaGFycykgaW50ZXJuYWwgcmV0dXJucyAoc3RyaW5nIG1lbW9yeSBfcmV0KSB7CiAgICAgICAgdWludDE2IGk7CiAgICAgICAgdWludDE2IGo7CiAgICAgICAgYm9vbCBtYXRjaGVkOwogICAgICAgIGZvciAoaT0wOyBpPGJ5dGVzKF9zZWxmKS5sZW5ndGg7ICsraSkgewogICAgICAgICAgICBtYXRjaGVkID0gZmFsc2U7CiAgICAgICAgICAgIGZvciAoaj0wOyBqPGJ5dGVzKF9jaGFycykubGVuZ3RoOyArK2opIHsKICAgICAgICAgICAgICAgIGlmIChieXRlcyhfc2VsZilbaV0gPT0gYnl0ZXMoX2NoYXJzKVtqXSkgewogICAgICAgICAgICAgICAgICAgIG1hdGNoZWQgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICghbWF0Y2hlZCkgewogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgdWludDE2IHN0YXJ0ID0gaTsKICAgICAgICAKICAgICAgICBmb3IgKGk9dWludDE2KGJ5dGVzKF9zZWxmKS5sZW5ndGgpOyBpPjA7IC0taSkgewogICAgICAgICAgICBtYXRjaGVkID0gZmFsc2U7CiAgICAgICAgICAgIGZvciAoaj0wOyBqPGJ5dGVzKF9jaGFycykubGVuZ3RoOyArK2opIHsKICAgICAgICAgICAgICAgIGlmIChieXRlcyhfc2VsZilbaS0xXSA9PSBieXRlcyhfY2hhcnMpW2pdKSB7CiAgICAgICAgICAgICAgICAgICAgbWF0Y2hlZCA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKCFtYXRjaGVkKSB7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICB1aW50MTYgZW5kID0gaTsKCiAgICAgICAgaWYgKGVuZCA8PSBzdGFydCkgewoJCSAgICBfcmV0ID0gIiI7CiAgICAgICAgICAgIHJldHVybiBfcmV0OwogICAgICAgIH0KICAgICAgICAKICAgICAgICBfcmV0ID0gbmV3IHN0cmluZyhlbmQtc3RhcnQpOwogICAgICAgIAogICAgICAgIHVpbnQgc2VsZnB0cjsKICAgICAgICB1aW50IHJldHB0cjsKICAgICAgICBhc3NlbWJseSB7CiAgICAgICAgICAgIHNlbGZwdHIgOj0gYWRkKF9zZWxmLCAweDIwKQogICAgICAgICAgICByZXRwdHIgOj0gYWRkKF9yZXQsIDB4MjApCiAgICAgICAgfQogICAgICAgIAogICAgICAgIG1lbWNweShyZX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vZmZzZXQgPSAwOwogICAgICAgIHVpbnQgc3BsaXRzQ291bnQgPSAxOwogICAgICAgIGludCBsaW1pdCA9IC0xOwogICAgICAgIHdoaWxlIChvZmZzZXQgPCBzcmNCeXRlcy5sZW5ndGggLSAxKSB7CiAgICAgICAgICAgIGxpbWl0ID0gaW5kZXhPZihzcmMsIHNlcGFyYXRvciwgb2Zmc2V0KTsKICAgICAgICAgICAgaWYgKGxpbWl0ID09IC0xKQogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgc3BsaXRzQ291bnQrKzsKICAgICAgICAgICAgICAgIG9mZnNldCA9IHVpbnQobGltaXQpICsgMTsKICAgICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgc3BsaXRBcnIgPSBuZXcgc3RyaW5nW10oc3BsaXRzQ291bnQpOwoKICAgICAgICBvZmZzZXQgPSAwOwogICAgICAgIHNwbGl0c0NvdW50ID0gMDsKICAgICAgICB3aGlsZSAob2Zmc2V0IDwgc3JjQnl0ZXMubGVuZ3RoIC0gMSkgewoKICAgICAgICAgICAgbGltaXQgPSBpbmRleE9mKHNyYywgc2VwYXJhdG9yLCBvZmZzZXQpOwogICAgICAgICAgICBpZiAobGltaXQgPT0gLSAxKSB7CiAgICAgICAgICAgICAgICBsaW1pdCA9IGludChzcmNCeXRlcy5sZW5ndGgpOwogICAgICAgICAgICB9CgogICAgICAgICAgICBzdHJpbmcgbWVtb3J5IHRtcCA9IG5ldyBzdHJpbmcodWludChsaW1pdCkgLSBvZmZzZXQpOwogICAgICAgICAgICBieXRlcyBtZW1vcnkgdG1wQnl0ZXMgPSBieXRlcyh0bXApOwoKICAgICAgICAgICAgdWludCBqID0gMDsKICAgICAgICAgICAgZm9yICh1aW50IGkgPSBvZmZzZXQ7IGkgPCB1aW50KGxpbWl0KTsgaSsrKSB7CiAgICAgICAgICAgICAgICB0bXBCeXRlc1tqKytdID0gc3JjQnl0ZXNbaV07CiAgICAgICAgICAgIH0KICAgICAgICAgICAgb2Zmc2V0ID0gdWludChsaW1pdCkgKyAxOwogICAgICAgICAgICBzcGxpdEFycltzcGxpdHNDb3VudCsrXSA9IHN0cmluZyh0bXBCeXRlcyk7CiAgICAgICAgfQogICAgICAgIHJldHVybiBzcGxpdEFycjsKICAgIH0KICAgIAoKICAgIAogICAgZnVuY3Rpb24gdG9JbnQoc3RyaW5nIG1lbW9yeSBfc2VsZikgaW50ZXJuYWwgcmV0dXJucyAoaW50IF9yZXQpIHsKICAgICAgICBfcmV0ID0gMDsKICAgICAgICBpZiAoYnl0ZXMoX3NlbGYpLmxlbmd0aCA9PSAwKSB7CiAgICAgICAgICAgIHJldHVybiBfcmV0OwogICAgICAgIH0KICAgICAgICAKICAgICAgICB1aW50MTYgaTsKICAgICAgICB1aW50OCBkaWdpdDsKICAgICAgICBmb3IgKGk9MDsgaTxieXRlcyhfc2VsZikubGVuZ3RoOyArK2kpIHsKICAgICAgICAgICAgZGlnaXQgPSB1aW50OChieXRlcyhfc2VsZilbaV0pOwogICAgICAgICAgICBpZiAoIShkaWdpdCA9PSAweDIwIHx8IGRpZ2l0ID09IDB4MDkgfHwgZGlnaXQgPT0gMHgwRCB8fCBkaWdpdCA9PSAweDBBKSkgewogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgCiAgICAgICAgYm9vbCBwb3NpdGl2ZSA9IHRydWU7CiAgICAgICAgaWYgKGJ5dGVzKF9zZWxmKVtpXSA9PSAnKycpIHsKICAgICAgICAgICAgcG9zaXRpdmUgPSB0cnVlOwogICAgICAgICAgICBpKys7CiAgICAgICAgfSBlbHNlIGlmKGJ5dGVzKF9zZWxmKVtpXSA9PSAnLScpIHsKICAgICAgICAgICAgcG9zaXRpdmUgPSBmYWxzZTsKICAgICAgICAgICAgaSsrOwogICAgICAgIH0KCiAgICAgICAgZm9yICg7IGk8Ynl0ZXMoX3NlbGYpLmxlbmd0aDsgKytpKSB7CiAgICAgICAgICAgIGRpZ2l0ID0gdWludDgoYnl0ZXMoX3NlbGYpW2ldKTsKICAgICAgICAgICAgaWYgKCEoZGlnaXQgPj0gMHgzMCAmJiBkaWdpdCA8PSAweDM5KSkgewogICAgICAgICAgICAgICAgcmV0dXJuIF9yZXQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgX3JldCA9IF9yZXQqMTAgKyBpbnQoZGlnaXQtMHgzMCk7CiAgICAgICAgfSAgICAgICAgCiAgICAgICAgCiAgICAgICAgaWYgKCFwb3NpdGl2ZSkgewogICAgICAgICAgICBfcmV0ID0gLV9yZXQ7CiAgICAgICAgfQogICAgfQoKICAgIGZ1bmN0aW9uIHRvQWRkcmVzcyhzdHJpbmcgbWVtb3J5IF9zZWxmKSBpbnRlcm5hbCByZXR1cm5zIChhZGRyZXNzIF9yZXQpIHsKICAgICAgICB1aW50MTYgaTsKICAgICAgICB1aW50OCBkaWdpdDsKICAgICAgICBmb3IgKGk9MDsgaTxieXRlcyhfc2VsZikubGVuZ3RoOyArK2kpIHsKICAgICAgICAgICAgZGlnaXQgPSB1aW50OChieXRlcyhfc2VsZilbaV0pOwogICAgICAgICAgICBpZiAoIShkaWdpdCA9PSAweDIwIHx8IGRpZ2l0ID09IDB4MDkgfHwgZGlnaXQgPT0gMHgwRCB8fCBkaWdpdCA9PSAweDBBKSkgewogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgCiAgICAgICAgaWYgKGJ5dGVzKF9zZWxmKS5sZW5ndGgtaSA8IDIpIHsKICAgICAgICAgICAgcmV0dXJuIGFkZHJlc3MoMCk7CiAgICAgICAgfQoKICAgICAgICAvL211c3Qgc3RhcnQgd2l0aCAweAogICAgICAgIGlmICghKGJ5dGVzKF9zZWxmKVtpXSA9PSAnMCcgJiYgYnl0ZXMoX3NlbGYpW2krMV18MHgyMCA9PSAneCcpKSB7CiAgICAgICAgICAgIHJldHVybiBhZGRyZXNzKDApOwogICAgICAgIH0KCiAgICAgICAgdWludCBhZGRyID0gMDsKICAgICAgICAKICAgICAgICBmb3IgKGkrPTI7IGk8Ynl0ZXMoX3NlbGYpLmxlbmd0aDsgKytpKSB7CiAgICAgICAgICAgIGRpZ2l0ID0gdWludDgoYnl0ZXMoX3NlbGYpW2ldKTsKICAgICAgICAgICAgaWYgKGRpZ2l0ID49IDB4MzAgJiYgZGlnaXQgPD0gMHgzOSkgLy8nMCctJzknCiAgICAgICAgICAgICAgICBkaWdpdCAtPSAweDMwOwogICAgICAgICAgICBlbHNlIGlmIChkaWdpdHwweDIwID49IDB4NjEgJiYgZGlnaXR8MHgyMCA8PSAweDY2KSAvLydhJy0nZicKICAgICAgICAgICAgICAgIGRpZ2l0ID0gZGlnaXQtMHg2MSsxMDsKICAgICAgICAgICAgZWxzZSAKICAgICAgICAgICAgICAgIHJldHVybiBhZGRyZXNzKDApOyAKICAgICAgICAgICAgCiAgICAgICAgICAgIGFkZHIgPSBhZGRyKjE2K2RpZ2l0OwogICAgICAgIH0KICAgICAgICAKICAgICAgICByZXR1cm4gYWRkcmVzcyhhZGRyKTsKICAgIH0KICAgIAogICAgZnVuY3Rpb24gdG9LZXlWYWx1ZShzdHJpbmcgbWVtb3J5IF9zZWxmLCBzdHJpbmcgbWVtb3J5IF9rZXkpIGludGVybmFsIHJldHVybnMgKHN0cmluZyBtZW1vcnkgX3JldCkgewogICAgICAgIF9yZXQgPSBuZXcgc3RyaW5nKGJ5dGVzKF9zZWxmKS5sZW5ndGggKyBieXRlcyhfa2V5KS5sZW5ndGggKyA1KTsKICAgICAgICAKICAgICAgICB1aW50IHNlbGZwdHI7CiAgICAgICAgdWludCBrZXlwdHI7CiAgICAgICAgdWludCByZXRwdHI7CiAgICAgICAgYXNzZW1ibHkgewogICAgICAgICAgICBzZWxmcHRyIDo9IGFkZChfc2VsZiwgMHgyMCkKICAgICAgICAgICAga2V5cHRyIDo9IGFkZChfa2V5LCAweDIwKQogICAgICAgICAgICByZXRw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9zID09IC0xKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9yZXQ7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIHBvcyArPSBpbnQoYnl0ZXMoX2tleSkubGVuZ3RoKzIpOwoKICAgICAgICAgICAgYm9vbCBjb2xvbiA9IGZhbHNlOwogICAgICAgICAgICB3aGlsZSAodWludChwb3MpIDwgYnl0ZXMoX3NlbGYpLmxlbmd0aCkgewogICAgICAgICAgICAgICAgaWYgKGJ5dGVzKF9zZWxmKVt1aW50KHBvcyldID09ICcgJyB8fCBieXRlcyhfc2VsZilbdWludChwb3MpXSA9PSAnXHQnIAogICAgICAgICAgICAgICAgICAgIHx8IGJ5dGVzKF9zZWxmKVt1aW50KHBvcyldID09ICdccicgfHwgYnl0ZXMoX3NlbGYpW3VpbnQocG9zKV0gPT0gJ1xuJykgewogICAgICAgICAgICAgICAgICAgIHBvcysrOwogICAgICAgICAgICAgICAgfSBlbHNlIGlmIChieXRlcyhfc2VsZilbdWludChwb3MpXSA9PSAnOicpIHsKICAgICAgICAgICAgICAgICAgICBwb3MrKzsKICAgICAgICAgICAgICAgICAgICBjb2xvbiA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CgogICAgICAgICAgICBpZih1aW50KHBvcykgPT0gYnl0ZXMoX3NlbGYpLmxlbmd0aCkgewogICAgICAgICAgICAgICAgcmV0dXJuIF9yZXQ7CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGlmIChjb2xvbikgewogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICBzZWFyY2hTdGFydCA9IHVpbnQocG9zKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICAKICAgICAgICBib29sIGRvdWJsZVF1b3RlcyA9IHRydWU7CiAgICAgICAgaW50IHN0YXJ0ID0gX3NlbGYuaW5kZXhPZigiXCIiLCB1aW50KHBvcykpOwogICAgICAgIGlmIChzdGFydCA9PSAtMSkgewogICAgICAgICAgICBkb3VibGVRdW90ZXMgPSBmYWxzZTsKICAgICAgICAgICAgc3RhcnQgPSBfc2VsZi5pbmRleE9mKCInIiwgdWludChwb3MpKTsKICAgICAgICAgICAgaWYgKHN0YXJ0ID09IC0xKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gX3JldDsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBzdGFydCArPSAxOwogICAgICAgIAogICAgICAgIGludCBlbmQ7CiAgICAgICAgaWYgKGRvdWJsZVF1b3RlcykgewogICAgICAgICAgICBlbmQgPSBfc2VsZi5pbmRleE9mKCJcIiIsIHVpbnQoc3RhcnQpKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBlbmQgPSBfc2VsZi5pbmRleE9mKCInIiwgdWludChzdGFydCkpOwogICAgICAgIH0KICAgICAgICBpZiAoZW5kID09IC0xKSB7CiAgICAgICAgICAgIHJldHVybiBfcmV0OwogICAgICAgIH0KICAgICAgICAKICAgICAgICBfcmV0ID0gX3NlbGYuc3Vic3RyKHVpbnQoc3RhcnQpLCB1aW50KGVuZC1zdGFydCkpOwogICAgfQogICAgCiAgICBmdW5jdGlvbiBnZXRJbnRWYWx1ZUJ5S2V5KHN0cmluZyBtZW1vcnkgX3NlbGYsIHN0cmluZyBtZW1vcnkgX2tleSkgaW50ZXJuYWwgcmV0dXJucyAoaW50IF9yZXQpIHsKICAgICAgICBfcmV0ID0gMDsKICAgICAgICBpbnQgcG9zID0gLTE7CiAgICAgICAgdWludCBzZWFyY2hTdGFydCA9IDA7CiAgICAgICAgd2hpbGUgKHRydWUpIHsKICAgICAgICAgICAgcG9zID0gX3NlbGYuaW5kZXhPZigiXCIiLmNvbmNhdChfa2V5LCAiXCIiKSwgc2VhcmNoU3RhcnQpOwogICAgICAgICAgICBpZiAocG9zID09IC0xKSB7CiAgICAgICAgICAgICAgICBwb3MgPSBfc2VsZi5pbmRleE9mKCInIi5jb25jYXQoX2tleSwgIiciKSwgc2VhcmNoU3RhcnQpOwogICAgICAgICAgICAgICAgaWYgKHBvcyA9PSAtMSkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBfcmV0OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CgogICAgICAgICAgICBwb3MgKz0gaW50KGJ5dGVzKF9rZXkpLmxlbmd0aCsyKTsKCiAgICAgICAgICAgIGJvb2wgY29sb24gPSBmYWxzZTsKICAgICAgICAgICAgd2hpbGUgKHVpbnQocG9zKSA8IGJ5dGVzKF9zZWxmKS5sZW5ndGgpIHsKICAgICAgICAgICAgICAgIGlmIChieXRlcyhfc2VsZilbdWludChwb3MpXSA9PSAnICcgfHwgYnl0ZXMoX3NlbGYpW3VpbnQocG9zKV0gPT0gJ1x0JyAKICAgICAgICAgICAgICAgICAgICB8fCBieXRlcyhfc2VsZilbdWludChwb3MpXSA9PSAnXHInIHx8IGJ5dGVzKF9zZWxmKVt1aW50KHBvcyldID09ICdcbicpIHsKICAgICAgICAgICAgICAgICAgICBwb3MrKzsKICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYnl0ZXMoX3NlbGYpW3VpbnQocG9zKV0gPT0gJzonKSB7CiAgICAgICAgICAgICAgICAgICAgcG9zKys7CiAgICAgICAgICAgICAgICAgICAgY29sb24gPSB0cnVlOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQoKICAgICAgICAgICAgaWYodWludChwb3MpID09IGJ5dGVzKF9zZWxmKS5sZW5ndGgpIHsKICAgICAgICAgICAgICAgIHJldHVybiBfcmV0OwogICAgICAgICAgICB9CgogICAgICAgICAgICBpZiAoY29sb24pIHsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgc2VhcmNoU3RhcnQgPSB1aW50KHBvcyk7CiAgICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIHVpbnQgaSA9IHVpbnQocG9zKTsKICAgICAgICB1aW50OCBkaWdpdDsKICAgICAgICBmb3IgKDsgaTxieXRlcyhfc2VsZikubGVuZ3RoOyArK2kpIHsKICAgICAgICAgICAgZGlnaXQgPSB1aW50OChieXRlcyhfc2VsZilbaV0pOwogICAgICAgICAgICBpZiAoIShkaWdpdCA9PSAweDIwIHx8IGRpZ2l0ID09IDB4MDkgfHwgZGlnaXQgPT0gMHgwRCB8fCBkaWdpdCA9PSAweDBBIAogICAgICAgICAgICB8fCBkaWdpdCA9PSAweDNBIC8qOiovIHx8IGRpZ2l0ID09IDB4MjIgLyoiKi8gfHwgZGlnaXQgPT0gMHgyNyAvKicqLykpIHsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIAogICAgICAgIGJvb2wgcG9zaXRpdmUgPSB0cnVlOwogICAgICAgIGlmIChieXRlcyhfc2VsZilbaV0gPT0gJysnKSB7CiAgICAgICAgICAgIHBvc2l0aXZlID0gdHJ1ZTsKICAgICAgICAgICAgaSsrOwogICAgICAgIH0gZWxzZSBpZihieXRlcyhfc2VsZilbaV0gPT0gJy0nKSB7CiAgICAgICAgICAgIHBvc2l0aXZlID0gZmFsc2U7CiAgICAgICAgICAgIGkrKzsKICAgICAgICB9CgogICAgICAgIGZvciAoOyBpPGJ5dGVzKF9zZWxmKS5sZW5ndGg7ICsraSkgewogICAgICAgICAgICBkaWdpdCA9IHVpbnQ4KGJ5dGVzKF9zZWxmKVtpXSk7CiAgICAgICAgICAgIGlmICghKGRpZ2l0ID49IDB4MzAgJiYgZGlnaXQgPD0gMHgzOSkpIHsKICAgICAgICAgICAgICAgIGlmICghcG9zaXRpdmUpIHsKICAgICAgICAgICAgICAgICAgICBfcmV0ID0gLV9yZXQ7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICByZXR1cm4gX3JldDsKICAgICAgICAgICAgfQogICAgICAgICAgICBfcmV0ID0gX3JldCoxMCArIGludChkaWdpdC0weDMwKTsKICAgICAgICB9ICAgICAgICAKICAgICAgICAKICAgICAgICBpZiAoIXBvc2l0aXZlKSB7CiAgICAgICAgICAgIF9yZXQgPSAtX3JldDsKICAgICAgICB9CiAgICB9CiAgICAKICAgIGZ1bmN0aW9uIHRvVXBwZXJjYXNlKHN0cmluZyBtZW1vcnkgc3JjKSBpbnRlcm5hbCBwdXJlIHJldHVybnMoc3RyaW5nIG1lbW9yeSl7CiAgICAgICAgYnl0ZXMgbWVtb3J5IHNyY2IgPSBieXRlcyhzcmMpOwogICAgICAgIGZvcih1aW50IGk9MDtpPHNyY2IubGVuZ3RoO2krKyl7CiAgICAgICAgICAgIGJ5dGUgYiA9IHNyY2JbaV07CiAgICAgICAgICAgIGlmKGIgPj0gJ2EnICYmIGIgPD0gJ3onKXsKICAgICAgICAgICAgICAgIGIgJj0gYnl0ZSgweERGKTsvLyAtMzIKICAgICAgICAgICAgICAgIHNyY2JbaV0gPSBiIDsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gc3JjOwogICAgfQogICAgCiAgICBmdW5jdGlvbiB0b0xvd2VyY2FzZShzdHJpbmcgbWVtb3J5IHNyYykgaW50ZXJuYWwgcHVyZSByZXR1cm5zKHN0cmluZyBtZW1vcnkpewogICAgICAgIGJ5dGVzIG1lbW9yeSBzcmNiID0gYnl0ZXMoc3JjKTsKICAgICAgICBmb3IodWludCBpPTA7aTxzcmNiLmxlbmd0aDtpKyspewogICAgICAgICAgICBieXRlIGIgPSBzcmNiW2ldOwogICAgICAgICAgICBpZihiID49ICdBJyAmJiBiIDw9ICdaJyl7CiAgICAgICAgICAgICAgICBiIHw9IDB4MjA7CiAgICAgICAgICAgICAgICBzcmNiW2ldID0gYjsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gc3JjOwogICAgfQoKCQogICAgZnVuY3Rpb24ga2V5RXhpc3RzKHN0cmluZyBtZW1vcnkgX3NlbGYsIHN0cmluZyBtZW1vcnkgX2tleSkgaW50ZXJuYWwgcmV0dXJucyAoYm9vbCBfcmV0KSB7CiAgICAgICAgaW50IHBvcyA9IF9zZWxmLmluZGV4T2YoIlwiIi5jb25jYXQoX2tleSwgIlwiIikpOwogICAgICAgIGlmIChwb3MgPT0gLTEpIHsKICAgICAgICAgICAgcG9zID0gX3NlbGYuaW5kZXhPZigiJyIuY29uY2F0KF9rZXksICInIikpOwogICAgICAgICAgICBpZiAocG9zID09IC0xKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIHJldHVybiB0cnVlOwogICAgfQoKICAgIGZ1bmN0aW9uIGluQXJyYXkoc3RyaW5nIG1lbW9yeSBfc2VsZiwgc3RyaW5nW10gc3RvcmFnZSBfYXJyYXkpIGludGVybmFsIHJldHVybnMgKGJvb2wgX3JldCkgewogICAgICAgIGZvciAodWludCBpPTA7IGk8X2FycmF5Lmxlbmd0aDsgKytpKSB7CiAgICAgICAgICAgIGlmIChfc2VsZi5lcXVhbHMoX2FycmF5W2ldKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIHJldHVybiBmYWxzZTsKICAgIH0KIAogICAgZnVuY3Rpb24gaW5BcnJheU5vQ2FzZShzdHJpbmcgbWVtb3J5IF9zZWxmLCBzdHJpbmdbXSBzdG9yYWdlIF9hcnJheSkgaW50ZXJuYWwgcmV0dXJucyAoYm9vbCBfcmV0KSB7CiAgICAgICAgZm9yICh1aW50IGk9MDsgaTxfYXJyYXkubGVuZ3RoOyArK2kpIHsKICAgICAgICAgICAgaWYgKF9zZWxmLmVxdWFsc05vQ2FzZShfYXJyYXlbaV0pKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgfQoKICB9";
    public static final String SAFE_MATH_SOURCE = "cHJhZ21hIHNvbGlkaXR5IF4wLjQuMjQ7CgoKbGlicmFyeSBTYWZlTWF0aCB7CiAgICBmdW5jdGlvbiBtdWwodWludDI1NiBhLCB1aW50MjU2IGIpIGludGVybmFsIHB1cmUgcmV0dXJucyAodWludDI1NikgewogICAgICAgIC8vIEdhcyBvcHRpbWl6YXRpb246IHRoaXMgaXMgY2hlYXBlciB0aGFuIHJlcXVpcmluZyAnYScgbm90IGJlaW5nIHplcm8sIGJ1dCB0aGUKICAgICAgICAvLyBiZW5lZml0IGlzIGxvc3QgaWYgJ2InIGlzIGFsc28gdGVzdGVkLgogICAgICAgIC8vIFNlZTogaHR0cHM6Ly9naXRodWIuY29tL09wZW5aZXBwZWxpbi9vcGVuemVwcGVsaW4tc29saWRpdHkvcHVsbC81MjIKICAgICAgICBpZiAoYSA9PSAwKSB7CiAgICAgICAgICAgIHJldHVybiAwOwogICAgICAgIH0KCiAgICAgICAgdWludDI1NiBjID0gYSAqIGI7CiAgICAgICAgcmVxdWlyZShjIC8gYSA9PSBiLCAiU2FmZU1hdGg6IG11bHRpcGxpY2F0aW9uIG92ZXJmbG93Iik7CgogICAgICAgIHJldHVybiBjOwogICAgfQogICAgZnVuY3Rpb24gZGl2KHVpbnQyNTYgYSwgdWludDI1NiBiKSBpbnRlcm5hbCBwdXJlIHJldHVybnMgKHVpbnQyNTYpIHsKICAgICAgICAvLyBTb2xpZGl0eSBvbmx5IGF1dG9tYXRpY2FsbHkgYXNzZXJ0cyB3aGVuIGRpdmlkaW5nIGJ5IDAKICAgICAgICByZXF1aXJlKGIgPiAwLCAiU2FmZU1hdGg6IGRpdmlzaW9uIGJ5IHplcm8iKTsKICAgICAgICB1aW50MjU2IGMgPSBhIC8gYjsKICAgICAgICAvLyBhc3NlcnQoYSA9PSBiICogYyArIGEgJSBiKTsgLy8gVGhlcmUgaXMgbm8gY2FzZSBpbiB3aGljaCB0aGlzIGRvZXNuJ3QgaG9sZAoKICAgICAgICByZXR1cm4gYzsKICAgIH0KICAgIGZ1bmN0aW9uIHN1Yih1aW50MjU2IGEsIHVpbnQyNTYgYikgaW50ZXJuYWwgcHVyZSByZXR1cm5zICh1aW50MjU2KSB7CiAgICAgICAgcmVxdWlyZShiIDw9IGEsICJTYWZlTWF0aDogc3VidHJhY3Rpb24gb3ZlcmZsb3ciKTsKICAgICAgICB1aW50MjU2IGMgPSBhIC0gYjsKCiAgICAgICAgcmV0dXJuIGM7CiAgICB9CiAgICBmdW5jdGlvbiBhZGQodWludDI1NiBhLCB1aW50MjU2IGIpIGludGVybmFsIHB1cmUgcmV0dXJucyAodWludDI1NikgewogICAgICAgIHVpbnQyNTYgYyA9IGEgKyBiOwogICAgICAgIHJlcXVpcmUoYyA+PSBhLCAiU2FmZU1hdGg6IGFkZGl0aW9uIG92ZXJmbG93Iik7CgogICAgICAgIHJldHVybiBjOwogICAgfQogICAgZnVuY3Rpb24gbW9kKHVpbnQyNTYgYSwgdWludDI1NiBiKSBpbnRlcm5hbCBwdXJlIHJldHVybnMgKHVpbnQyNTYpIHsKICAgICAgICByZXF1aXJlKGIgIT0gMCwgIlNhZmVNYXRoOiBtb2R1bG8gYnkgemVybyIpOwogICAgICAgIHJldHVybiBhICUgYjsKICAgIH0KfQo=";
    public static final String TABLE_SOURCE = "cHJhZ21hIHNvbGlkaXR5IF4wLjQuMjQ7Cgpjb250cmFjdCBUYWJsZUZhY3RvcnkgewogICAgZnVuY3Rpb24gb3BlblRhYmxlKHN0cmluZykgcHVibGljIHZpZXcgcmV0dXJucyAoVGFibGUpOyAvL29wZW4gdGFibGUKICAgIGZ1bmN0aW9uIGNyZWF0ZVRhYmxlKHN0cmluZywgc3RyaW5nLCBzdHJpbmcpIH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nQpIGludGVybmFsIHsKICAgICAgICByZXF1aXJlKGhhcyhyb2xlLCBhY2NvdW50KSwgIlJvbGVzOiBhY2NvdW50IGRvZXMgbm90IGhhdmUgcm9sZSIpOwogICAgICAgIHJvbGUuYmVhcmVyW2FjY291bnRdID0gZmFsc2U7CiAgICB9CgogICAgZnVuY3Rpb24gaGFzKFJvbGUgc3RvcmFnZSByb2xlLCBhZGRyZXNzIGFjY291bnQpIGludGVybmFsIHZpZXcgcmV0dXJucyAoYm9vbCkgewogICAgICAgIHJlcXVpcmUoYWNjb3VudCAhPSBhZGRyZXNzKDApLCAiUm9sZXM6IGFjY291bnQgaXMgdGhlIHplcm8gYWRkcmVzcyIpOwogICAgICAgIHJldHVybiByb2xlLmJlYXJlclthY2NvdW50XTsKICAgIH0KfQo=";
    // v1.5.2
    public static final String REGISTER_SOURCE = "cHJhZ21hIHNvbGlkaXR5IF4wLjQuMjU7CgoKY29udHJhY3QgUmVnaXN0ZXIgIHsKICAgIC8qCiAgICAgKiBieXRlczQoa2VjY2FrMjU2KCdzdXBwb3J0c0ludGVyZmFjZShieXRlczQpJykpID09IDB4MDFmZmM5YTcKICAgICAqLwogICAgYnl0ZXM0IHByaXZhdGUgY29uc3RhbnQgX0lOVEVSRkFDRV9JRF9CQUMgPSAweDAxZmZjOWE3OwoKICAgIC8qKgogICAgICogQGRldiBNYXBwaW5nIG9mIGludGVyZmFjZSBpZHMgdG8gd2hldGhlciBvciBub3QgaXQncyBzdXBwb3J0ZWQuCiAgICAgKi8KICAgIG1hcHBpbmcoYnl0ZXM0ID0+IGJvb2wpIHByaXZhdGUgX3N1cHBvcnRlZEludGVyZmFjZXM7CgogICAgLyoqCiAgICAgKiBAZGV2IEEgY29udHJhY3QgaW1wbGVtZW50aW5nIFN1cHBvcnRzSW50ZXJmYWNlV2l0aExvb2t1cAogICAgICoKICAgICAqCiAgICAgKi8KICAgIGNvbnN0cnVjdG9yICgpIGludGVybmFsIHsKICAgICAgICBfcmVnaXN0ZXJ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UgYWNjb3VudCB0byBjaGVjawogICAgICogQHJldHVybiB3aGV0aGVyIHRoZSB0YXJnZXQgYWRkcmVzcyBpcyBhIGNvbnRyYWN0CiAgICAgKi8KICAgIGZ1bmN0aW9uIGlzQ29udHJhY3QoYWRkcmVzcyBhY2NvdW50KSBpbnRlcm5hbCB2aWV3IHJldHVybnMgKGJvb2wpIHsKICAgICAgICB1aW50MjU2IHNpemU7CiAgICAgICAgLy8gWFhYIEN1cnJlbnRseSB0aGVyZSBpcyBubyBiZXR0ZXIgd2F5IHRvIGNoZWNrIGlmIHRoZXJlIGlzIGEgY29udHJhY3QgaW4gYW4gYWRkcmVzcwogICAgICAgIC8vIHRoYW4gdG8gY2hlY2sgdGhlIHNpemUgb2YgdGhlIGNvZGUgYXQgdGhhdCBhZGRyZXNzLgogICAgICAgIC8vIFNlZSBodHRwczovL2V0aGVyZXVtLnN0YWNrZXhjaGFuZ2UuY29tL2EvMTQwMTYvMzY2MDMKICAgICAgICAvLyBmb3IgbW9yZSBkZXRhaWxzIGFib3V0IGhvdyB0aGlzIHdvcmtzLgogICAgICAgIC8vIFRPRE8gQ2hlY2sgdGhpcyBhZ2FpbiBiZWZvcmUgdGhlIFNlcmVuaXR5IHJlbGVhc2UsIGJlY2F1c2UgYWxsIGFkZHJlc3NlcyB3aWxsIGJlCiAgICAgICAgLy8gY29udHJhY3RzIHRoZW4uCiAgICAgICAgLy8gc29saGludC1kaXNhYmxlLW5leHQtbGluZSBuby1pbmxpbmUtYXNzZW1ibHkKICAgICAgICBhc3NlbWJseSB7IHNpemUgOj0gZXh0Y29kZXNpemUoYWNjb3VudCkgfQogICAgICAgIHJldHVybiBzaXplID4gMDsKICAgIH0KfQ==";

    public static final String ADDRESS_MD = "# Address\n" +
            "\n" +
            "Address library\n" +
            "\n" +
            "Address contract usage methods can refer to the Points contract warehouse。\n" +
            "\n" +
            "1. Detect whether the address is a contract\n" +
            "2. Detect if the address is 0x0";
    public static final String LIB_STRING_MD = "# String library\n" +
            "\n" +
            "String library\n" +
            "\n" +
            "Provides common string-related operations, including copying, finding, replacing, and so on。";
    public static final String SAFE_MATH_MD = "# SafeMath\n" +
            "\n" +
            "SafeMath library\n" +
            "\n" +
            "A secure mathematical library that provides a safe addition, subtract, and divide。The use of secure mathematical contracts can refer to the Points contract warehouse。";
    public static final String TABLE_MD = "# table\n" +
            "\n" +
            "table library\n" +
            "\n" +
            "BCOS CRUD uses the base library, which you can reference by re-contract calling CRUD.Table contract usage methods can be described by referring to the assat example in the bcos document https://fisco-bcos-documentation.readthedocs.io.";
    public static final String ROLES_MD ="# Roles\n" +
            "\n" +
            "Role permissions control contracts\n";
    public static final String REGISTER_MD ="# Register\n" +
        "\n" +
        "Register control contract\n";
    public static final String COUNTERS_MD ="# Counters\n" +
        "\n" +
        "Counters tool contract\n";

    /**
     * tool contract from smart dev
     */
    public static final String TABLE_TEST_SOURCE = "cHJhZ21hIHNvbGlkaXR5ID49MC40LjI0IDwwLjYuMTE7CnByYWdtYSBleHBlcmltZW50YWwgQUJJRW5jb2RlclYyOwoKaW1wb3J0ICIuL1RhYmxlLnNvbCI7Cgpjb250cmFjdCBUYWJsZVRlc3QgewogICAgZXZlbnQgQ3JlYXRlUmVzdWx0KGludDI1NiBjb3VudCk7CiAgICBldmVudCBJbnNlcnRSZXN1bHQoaW50MjU2IGNvdW50KTsKICAgIGV2ZW50IFVwZGF0ZVJlc3VsdChpbnQyNTYgY291bnQpOwogICAgZXZlbnQgUmVtb3ZlUmVzdWx0KGludDI1NiBjb3VudCk7CgogICAgVGFibGVGYWN0b3J5IHRhYmxlRmFjdG9yeTsKICAgIHN0cmluZyBjb25zdGFudCBUQUJMRV9OQU1FID0gInRfdGVzdCI7CiAgICBjb25zdHJ1Y3RvcigpIHB1YmxpYyB7CiAgICAgICAgdGFibGVGYWN0b3J5ID0gVGFibGVGYWN0b3J5KDB4MTAwMSk7IC8vVGhlIGZpeGVkIGFkZHJlc3MgaXMgMHgxMDAxIGZvciBUYWJsZUZhY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B0YWJsZS5zZXQoaWQsIGVudHJ5KTsKICAgICAgICBlbWl0IFNldFJlc3VsdChjb3VudCk7CiAgICAgICAgcmV0dXJuIGNvdW50OwogICAgfQp9";
    public static final String HELLO_WORLD_SOURCE = "cHJhZ21hIHNvbGlkaXR5ID49MC40LjI0IDwwLjYuMTE7Cgpjb250cmFjdCBIZWxsb1dvcmxkIHsKICAgIHN0cmluZyBuYW1lOwoKICAgIGNvbnN0cnVjdG9yKCkgcHVibGljIHsKICAgICAgICBuYW1lID0gIkhlbGxvLCBXb3JsZCEiOwogICAgfQoKICAgIGZ1bmN0aW9uIGdldCgpIHB1YmxpYyB2aWV3IHJldHVybnMgKHN0cmluZyBtZW1vcnkpIHsKICAgICAgICByZXR1cm4gbmFtZTsKICAgIH0KCiAgICBmdW5jdGlvbiBzZXQoc3RyaW5nIG1lbW9yeSBuKSBwdWJsaWMgewogICAgICAgIG5hbWUgPSBuOwogICAgfQp9";
    public static final String CRYPTO_SOURCE = "LyoqCiAqIG9ubHkgc3VwcG9ydGVkIGluIEZJU0NPLUJDT1MgdjIuOC4wKyAKICovCmNvbnRyYWN0IENyeXB0bwp7CiAgICBmdW5jdGlvbiBzbTMoYnl0ZXMgbWVtb3J5IGRhdGEpIHB1YmxpYyB2aWV3IHJldHVybnMoYnl0ZXMzMil7fQogICAgZnVuY3Rpb24ga2VjY2FrMjU2SGFzaChieXRlcyBtZW1vcnkgZGF0YSkgcHVibGljIHZpZXcgcmV0dXJucyhieXRlczMyKXt9CiAgICBmdW5jdGlvbiBzbTJWZXJpZnkoYnl0ZXMzMiAgbWVzc2FnZSwgYnl0ZXMgbWVtb3J5IHB1YmxpY0tleSwgYnl0ZXMzMiByLCBieXRlczMyIHMpIHB1YmxpYyB2aWV3IHJldHVybnMoYm9vbCwgYWRkcmVzcyl7fQogICAgZnVuY3Rpb24gY3VydmUyNTUxOVZSRlZlcmlmeShzdHJpbmcgbWVtb3J5IGlucHV0LCBzdHJpbmcgbWVtb3J5IHZyZlB1YmxpY0tleSwgc3RyaW5nIG1lbW9yeSB2cmZQcm9vZikgcHVibGljIHZpZXcgcmV0dXJucyhib29sLHVpbnQyNTYpe30KfQ==";
    public static final String CRYPTO_SHA_SOURCE = "cHJhZ21hIHNvbGlkaXR5ID49MC40LjI0IDwwLjYuMTE7CgpwcmFnbWEgZXhwZXJpbWVudGFsIEFCSUVuY29kZXJWMjsKCmltcG9ydCAiLi9DcnlwdG8uc29sIjsKCi8qKgogKiBvbmx5IHN1cHBvcnRlZCBpbiBGSVNDTy1CQ09TIHYyLjguMCsgCiAqLwpjb250cmFjdCBTaGFUZXN0ewogICAgYnl0ZXMgX2RhdGEgPSAiSGVsbG8sIFNoYVRlc3QiOwogICAgQ3J5cHRvIGNyeXB0bzsKCiAgICBjb25zdHJ1Y3RvcigpIHB1YmxpYyB7CiAgICAgICAgY3J5cHRvID0gQ3J5cHRvKDB4NTAwNik7CiAgICB9CgogICAgZnVuY3Rpb24gZ2V0U2hhMjU2KGJ5dGVzIG1lbW9yeSBfbWVtb3J5KSBwdWJsaWMgcmV0dXJucyhieXRlczMyIHJlc3VsdCkKICAgIHsKICAgICAgICByZXR1cm4gc2hhMjU2KF9tZW1vcnkpOwogICAgfQoKICAgIGZ1bmN0aW9uIGdldEtlY2NhazI1NihieXRlcyBtZW1vcnkgX21lbW9yeSkgcHVibGljIHJldHVybnMoYnl0ZXMzMiByZXN1bHQpCiAgICB7CiAgICAgICAgcmV0dXJuIGtlY2NhazI1NihfbWVtb3J5KTsKICAgIH0KCiAgICBmdW5jdGlvbiBnZXREYXRhKCkgcHVibGljIHZpZXcgcmV0dXJucyhieXRlcyBtZW1vcnkpCiAgICB7CiAgICAgICAgcmV0dXJuIF9kYXRhOwogICAgfQp9Cg==";


    // markdown description
    public final static String HELLO_WORLD_MD = "# HelloWorld\n"
        + "\n"
        + "HelloWorld Contract\n";

    public final static String TABLE_CRUD_MD = "# Table\n"
        + "\n"
        + "Table contract for CRUD, [CRUD API](https://fisco-bcos-documentation.readthedocs.io/zh_CN/latest/docs/articles/3_features/33_storage/crud_guidance.html)\n";
    public final static String TABLE_CRUD_TEST_MD = "# TableTest\n"
        + "\n"
        + "Table contract for CRUD \n"
        + "\n"
        + "CRUD Test, [CRUD API](https://fisco-bcos-documentation.readthedocs.io/zh_CN/latest/docs/articles/3_features/33_storage/crud_guidance.html)\n";
    public final static String KVTABLE_TEST_MD = "# KVTableTest\n"
        + "\n"
        + "KVTable contract for CRUD \n"
        + "\n"
        + "CRUD Test, [CRUD API](https://fisco-bcos-documentation.readthedocs.io/zh_CN/latest/docs/articles/3_features/33_storage/crud_guidance.html)\n";
    public final static String CRYPTO_MD = "# Crypto\n"
        + "\n"
        + "Crypto Interface Contract"
        + "\n"
        + "Supported in FISCO-BCOS above version of v2.8.0, [Crypto API](https://toolkit-doc.readthedocs.io/zh_CN/latest/docs/WeBankBlockchain-SmartDev-Contract/api/default/Crypto.html)\n";
    public final static String CRYPTO_SHA_TEST_MD = "# ShaTest\n"
        + "\n"
        + "Crypto Interface Contract\n"
        + "\n"
        + "Crypto Test Contract, Supported in FISCO-BCOS above version of v2.8.0, [Crypto API](https://toolkit-doc.readthedocs.io/zh_CN/latest/docs/WeBankBlockchain-SmartDev-Contract/api/default/Crypto.html)\n";

}
